mariadb.git
3 months agoMerge mariadb (1:11.8.8-1) import into refs/heads/workingbranch
Otto Kekäläinen [Tue, 2 Jun 2026 00:02:02 +0000 (00:02 +0000)]
Merge mariadb (1:11.8.8-1) import into refs/heads/workingbranch

3 months agoUpdate TLS test regexes for OpenSSL 4.0 error message changes
Otto Kekäläinen [Fri, 5 Jun 2026 02:20:51 +0000 (02:20 +0000)]
Update TLS test regexes for OpenSSL 4.0 error message changes

OpenSSL 4.0 changed TLS alert error messages from "ssl/tls alert ..." to
"tls alert ...", causing main.ssl_crl and main.tlsv13 to fail with
result mismatches like:

    -ERROR 2026 (HY000): TLS/SSL error: ssl/tls alert handshake failure
    -ERROR 2026 (HY000): TLS/SSL error: ssl/tls alert handshake failure
    +ERROR 2026 (HY000): TLS/SSL error: tls alert handshake failure
    +ERROR 2026 (HY000): TLS/SSL error: tls alert handshake failure

Update the `--replace_regex` patterns in both tests to accept the new
"tls alert" variant alongside the existing "sslv3" and "ssl/tls"
formats, normalizing them to the expected "ssl/tls" output so the
result files remain valid across OpenSSL versions.

Forwarded: https://github.com/MariaDB/server/pull/5186

Gbp-Pq: Name Update-TLS-test-regexes-for-OpenSSL-4.0-error-message-cha.patch

3 months agoMDEV-39509: Fix "invalid iv length" with OpenSSL 4.0
Georg Richter [Sat, 2 May 2026 09:44:03 +0000 (11:44 +0200)]
MDEV-39509: Fix "invalid iv length" with OpenSSL 4.0

OpenSSL 4.0 changed the behavior of EVP_CIPHER_CTX_new:
It now initializes the internal iv_len with a sentinel
value of -1. When calling EVP_CipherInit_ex with the
cipher, key, and IV simultaneously, the provider validates
the IV against this sentinel before the cipher's default
metadata is applied, triggering an error.

This patch implements a two-stage initialization for OpenSSL 4.0+:
- Call EVP_CipherInit_ex with only the cipher to "thaw" the
  context and set the correct default iv_len.
- Perform a second call to provide the actual Key and IV data.

This approach ensures compatibility with OpenSSL 4.0 while
avoiding EVP_CipherInit_ex2 to maintain support for FIPS mode
and older versions.

(cherry picked from commit 5ca4ab639ad5f99d74f794b54ba1b4d6182ec2a9 from
upstream feature branch, not yet merged)

Forwarded: https://github.com/MariaDB/server/pull/5029

Gbp-Pq: Name MDEV-39509-Fix-invalid-iv-length-with-OpenSSL-4.0.patch

3 months agoMDEV-34195 tests: avoid LP64 MYSQL size assert on x32
Aquila Macedo [Mon, 20 Apr 2026 14:40:01 +0000 (11:40 -0300)]
MDEV-34195 tests: avoid LP64 MYSQL size assert on x32

x32 defines __x86_64__ but uses the ILP32 ABI, so the LP64
sizeof(MYSQL) == 1272 compile-time assert is selected incorrectly
and breaks the build.

Guard the x86_64 check with !defined(__ILP32__) so the LP64 size assert
only applies to real amd64 LP64 builds, while leaving the existing
Windows amd64 and i386 checks unchanged.

(cherry-picked from 936f04c4f9bd5d66014942bd27e1996b2e740626)

Merged on 10.11, and will be included in next release (10.11.19+, 11.8.9+).

Forwarded: https://github.com/MariaDB/server/pull/4962

Gbp-Pq: Name MDEV-34195-tests-avoid-LP64-MYSQL-size-assert-on-x32.patch

3 months agoMDEV-39290 mytop use invoking login as default user on Unix
Aquila Macedo [Wed, 8 Apr 2026 14:19:44 +0000 (11:19 -0300)]
MDEV-39290 mytop use invoking login as default user on Unix

On non-Windows systems, use the invoking user's login name as the
default MariaDB username instead of hardcoding root.

Resolve the username from getpwuid($<), falling back to LOGNAME, USER,
and finally root. Keep the existing root default on Windows.

This makes mytop behave more like the mysql and mariadb clients and
avoids confusing authentication failures on systems where local socket
access is configured for the OS user rather than root.

Also update the connection error text and POD to describe the actual
default behavior.

(cherry picked from commit 14502365efa17b78281e53dd1ab883f5e298a432)

Merged in upstream branch 13.0. Debian patch can be dropped when importing
new upstream major version 13.0+.

Forwarded: https://github.com/MariaDB/server/pull/4918

Gbp-Pq: Name MDEV-39290-mytop-use-invoking-login-as-default-user-on-Un.patch

3 months agoFix more misc spelling in MariaDB Server repository
Otto Kekalainen [Tue, 28 Apr 2026 14:50:58 +0000 (22:50 +0800)]
Fix more misc spelling in MariaDB Server repository

Fixes following Lintian nags:

    X: mariadb-plugin-connect: spelling-error-in-binary Exeption Exception [usr/lib/mysql/plugin/ha_connect.so]
    X: mariadb-client-core: spelling-error-in-binary specifiying specifying [usr/bin/mariadb-migrate-config-file]

Forwarded: https://github.com/MariaDB/server/pull/5031, https://github.com/MariaDB/server/pull/5163

Gbp-Pq: Name Fix-more-misc-spelling-in-MariaDB-Server-repository.patch

3 months agoAdd AppArmor notice for Debian/Ubuntu users during server startup
Otto Kekäläinen [Wed, 8 Apr 2026 15:32:51 +0000 (23:32 +0800)]
Add AppArmor notice for Debian/Ubuntu users during server startup

When MariaDB fails to start due to permission errors, users on
Debian/Ubuntu might not be able to guess that AppArmor might be the
cause, and they should check for AppArmor denials in the kernel audit
log.

Add an informational message during startup that:
- Only prints when the 'mariadbd' profile is actually loaded
- Includes exact commands from the Debian packaging NEWS
- Provides actionable paths for local overrides
- Mentions both complain and enforce modes for troubleshooting

The message is printed once during normal server startup (not in help or
bootstrap modes) through the existing logging infrastructure, ensuring
it appears in both syslog and the error log where users will see it when
troubleshooting startup failures.

Forwarded: https://github.com/MariaDB/server/pull/5003

Gbp-Pq: Name Add-AppArmor-notice-for-Debian-Ubuntu-users-during-server.patch

3 months agoUpdate default datadir config to /var/lib/mariadb.
Lena Voytek [Tue, 28 Apr 2026 14:39:51 +0000 (22:39 +0800)]
Update default datadir config to /var/lib/mariadb.

Last-Update: 2026-03-24

Use /var/lib/mariadb as the default datadir for Debian/Ubuntu to improve
co-installability between MySQL and MariaDB servers.
Last-Update: 2026-03-24

Forwarded: https://github.com/MariaDB/server/pull/5059

Gbp-Pq: Name set-default-datadir-to-var-lib-mariadb.patch

3 months agosysusers.d: lock mysql user and keep Debian home/shell
Aquila Macedo [Fri, 9 Jan 2026 00:34:26 +0000 (21:34 -0300)]
sysusers.d: lock mysql user and keep Debian home/shell

Use u! and set HOME=/nonexistent and shell=/bin/false for the mysql
user.

This patch should be submitted upstream once proven stable in Debian.

Forwarded: https://github.com/MariaDB/server/pull/5012

Gbp-Pq: Name sysusers-lock-mysql-account.patch

3 months agoMake the new merge_alter test indifferent to extra version info
Otto Kekäläinen [Thu, 27 Nov 2025 00:49:24 +0000 (16:49 -0800)]
Make the new merge_alter test indifferent to extra version info

Modify the test regex to accept any extra version info, just like it
accepts any server version info. The test is supposed to fail on actual
differences in behaviour and server info strings are intentionally
normalized and not regarded.

Without this modification, the test introduced in 9e8e215e would fail
in post-build MTR on "from Debian-log" and in autopkgtest on "from Debian":

    main.merge_alter                         w4 [ fail ]
            Test ended at 2025-11-26 22:41:38
    CURRENT_TEST: main.merge_alter
    /usr/share/mariadb/mariadb-test/main/merge_alter.result 2025-11-13 11:45:29.000000000 +0300
    /tmp/tmp.3vGjZWHA79/var/4/log/merge_alter.reject 2025-11-27 01:41:38.523996124 +0300
    @@ -10,7 +10,7 @@
     /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
     DELIMITER /*!*/;
     # at #
    -#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
    +#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## from Debian created 010909  4:46:40 at startup
     ROLLBACK/*!*/;
     # at #
     #010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Gtid list []
    Result length mismatch

Forwarded: not-needed

Gbp-Pq: Name include-debian-in-test-merge-alter-result.patch

3 months agoSuppress native AIO warning introduced in 10.8.3
Otto Kekäläinen [Fri, 8 Aug 2025 04:30:51 +0000 (21:30 -0700)]
Suppress native AIO warning introduced in 10.8.3

Upstream a87bb96 introduced a new warning, visible at least on all ppc64el and
s390x builds which makes the post-build mariadb-test-test fail:

    [Warning] InnoDB: native AIO failed: falling back to
    innodb_use_native_aio=OFF

The case of this is the ci environment only where there is insufficent
fs.aio-max-nr configured. A such we are adding a suppression to the
mtr only. The warning is valuable for users. Upstream MDEV-37411 has
added a io_setup as a warning, which will fail in the CI environment,
so we're pre-emptively suppressing this warning too.

Unlike upstream MariaDB, in Debian we removed libaio in for Linux on
MariaDB 10.6+ in 612630c6 and completely in 1d648d6f. This was re-added
by upstream added a system variable innodb_linux_aio to control, and
also provided automated fallback. As such we're readding it back too.

With liburing still seccomp filterer in container environments having
a libaio fallback is more valuable than the threads implementation of
last resort.

Edited & Updated: Daniel Black <daniel@mariabdb.org>

Upstream rejected this with the conclusion, is that it will start working in
Debian/Salsa/Ubuntu/Launchpad once the Linux kernel is new enough to handle the
I/O calls and fallbacks properly, or once the CI system increases the value of
/proc/sys/fs/aio-max-nr to 1 million or so, to allow multiple parallel MariaDB
servers (as started by mariadb-test-run) each have enough quota for native AIO
to work.

Forwarded: https://jira.mariadb.org/browse/MDEV-37411 (rejected)

Gbp-Pq: Name MDEV-37411-suppress-new-warning-about-native-aio.patch

3 months agoImprove output from mariadb-secure-installation to be more honest
Otto Kekäläinen [Wed, 4 Jun 2025 11:46:31 +0000 (14:46 +0300)]
Improve output from mariadb-secure-installation to be more honest

The script is not useful in Debian, and likely misleading to users.
Improve the output to be more clear about what it is doing or is not
doing.

Merged on 'main' in
https://github.com/MariaDB/server/commit/3a08a8e3d2212f3f60937b3fd97207c3ea7b933a
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4457

Gbp-Pq: Name Improve-output-from-mariadb-secure-installation-to-be-mor.patch

3 months agoFix misc spelling in MariaDB Server repository
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Fix misc spelling in MariaDB Server repository

Note! Do not update this patch with new typos, but put them in a new
patch that can be submitted upstream and tracked separately.

* Fix misc typos in MariaDB Server

* Fix spelling of 'allows one to'

  Fix the following Lintian nags introduced in commit
  c8d040938a7ebe10e62506a726702c5990ef4dda:

  X: libmariadbd19t64: spelling-error-in-binary choosen chosen [usr/lib/x86_64-linux-gnu/libmariadbd.so.19]
  X: mariadb-backup: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-backup]
  X: mariadb-backup: spelling-error-in-binary choosen chosen [usr/bin/mariadb-backup]
  X: mariadb-server-core: spelling-error-in-binary "allows to" "allows one to" [usr/sbin/mariadbd]
  X: mariadb-server-core: spelling-error-in-binary choosen chosen [usr/sbin/mariadbd]
  X: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-client-test-embedded]
  X: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-test-embedded]
  X: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/test-connect-t]
  X: mariadb-test: spelling-error-in-binary choosen chosen [usr/bin/mariadb-client-test-embedded]
  X: mariadb-test: spelling-error-in-binary choosen chosen [usr/bin/mariadb-test-embedded]
  X: mariadb-test: spelling-error-in-binary choosen chosen [usr/bin/test-connect-t]

Merged in https://github.com/MariaDB/server/commit/5879c85f505d3a11d4b8f479f2437416d8a1d724
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4458

Gbp-Pq: Name Fix-misc-spelling-in-MariaDB-Server-repository.patch

3 months agoDisable the 'mysql*' command deprecation warning
Otto Kekalainen [Sun, 30 Jun 2024 15:18:06 +0000 (15:18 +0000)]
Disable the 'mysql*' command deprecation warning

Many command-line tools expect the commands they run to return without
any output in stderr or having error codes. The fact that now in MariaDB
11.4 all 'mysql*' commands emit a deprecation warning causes a lot of
scripts to fail, such as the /etc/init.d/mariadb itself and many dependent
programs as witnessed via Debian autopkgtests. See examples below.

https://ci.debian.net/packages/m/mariadb-connector-odbc/testing/amd64/48373500/
https://ci.debian.net/packages/p/pam-mysql/testing/amd64/48373511/
https://ci.debian.net/packages/r/roundcube/testing/amd64/48373518/

Forwarded: not-needed

Gbp-Pq: Name hide-mysql-command-deprecation-warnings.patch

3 months agoShow banner in server and client startup to drive community engagement
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Show banner in server and client startup to drive community engagement

Suggest to users that they can support MariaDB development by simply giving a
star on GitHub. This patch experiments with how well such a banner works, and
may later change the contents to drive some other kind of engagement.

Client output:

    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 17
    Server version: 11.8.1-MariaDB-5 from Debian -- Please help get to 10k stars at https://github.com/MariaDB/Server

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>

Server output:
    [Note] Please help get to 10k stars at https://github.com/MariaDB/Server

Server output if built in git directory:
    [Note] Starting MariaDB 11.8.1-MariaDB-5 from Debian source revision 1a9c3debfd6b1b16af4e501d3530b866b85c38a8 server_uid eNAjF8/wvUNM09/mSmh+k3a5o5w= as process 1359

Logs will also show as server output:
    mysqld: Version: '11.8.1-MariaDB-5 from Debian'  socket: '/run/mysqld/mysqld.sock'  port: 3306  -- Please help get to 10k stars at https://github.com/MariaDB/Server

This patch can be dropped if Debian updates to ship

Something similar was merged in https://github.com/MariaDB/server/commit/346c7afe9b7071ce9c47892a83d69944b608b3da
and thus included in MariaDB 12.3 onward.

Forwarded: not-needed

Gbp-Pq: Name startup-message.patch

3 months agoInstall PAM modules and systemd units into /usr
Michael Biebl [Mon, 22 Jan 2024 21:52:25 +0000 (22:52 +0100)]
Install PAM modules and systemd units into /usr

Since Debian trixie all files need to be installed into their canonical
location under /usr.

Merged in https://github.com/MariaDB/server/commit/34aac090f2acc1a4b5850810fe41370c19659d55
and thus included in MariaDB 12.3.2 and onward.

Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061348
Forwarded: https://github.com/MariaDB/server/pull/4065

Gbp-Pq: Name install-files-into-usr.patch

3 months agocmake: add support for reproducible buildS
Sutou Kouhei [Sat, 5 Feb 2022 02:05:39 +0000 (11:05 +0900)]
cmake: add support for reproducible buildS

We should use relative path not absolute path. We can use target without
breaking reproducibility.

This patch can be removed once MariaDB ships with Mroonga v12.00+ that has
https://github.com/mroonga/mroonga/commit/27caeb9b8ce7fa432b1251eca475b517c6902a6c

Origin: https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927
Bug: https://github.com/mroonga/mroonga/issues/298
Forwarded: not-needed

Gbp-Pq: Name mroonga-mrn-lib-dirs-path-reproducible-build.patch

3 months agoFix perl path in scripts
Otto Kekalainen [Sun, 20 Dec 2020 18:58:42 +0000 (20:58 +0200)]
Fix perl path in scripts

Fix Lintian issue https://lintian.debian.org/tags/incorrect-path-for-interpreter.html

Upstream will never accept this patch,
see https://github.com/MariaDB/server/pull/1718

Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/1718.patch
Forwarded: https://github.com/MariaDB/server/pull/1718 (rejected, will never be merged)

Gbp-Pq: Name env-perl-usr-bin-perl.patch

3 months agomariadb (1:11.8.8-1) unstable; urgency=medium
Otto Kekäläinen [Tue, 2 Jun 2026 00:02:02 +0000 (00:02 +0000)]
mariadb (1:11.8.8-1) unstable; urgency=medium

  [ Otto Kekäläinen ]
  * New upstream version 11.8.8 with critical fix for regression in 11.8.7 as
    noted at https://mariadb.com/docs/release-notes/community-server/11.8/11.8.8
    and for the following security issues:
    - CVE-2026-48165
    - CVE-2026-48163
  * Previous upstream version 11.8.7 included fixes for several defects as noted
    at https://mariadb.com/docs/release-notes/community-server/11.8/11.8.7 as
    well the following security issues:
    - CVE-2026-44173
    - CVE-2026-44172
    - CVE-2026-44171
    - CVE-2026-44170
    - CVE-2026-44169
    - CVE-2026-44168
  * Also cherry-pick the following upstream debian/ changes:
    - MDEV-38587 slow_query_log missing from debian conf
    - MDEV-39031 remove Docs/README-wsrep
    - MDEV-34902 debian-start erroneously reports issues
    - MDEV-32745 Add a simple MySQL to MariaDB upgrade helper (Debian part)
  * Update configuration traces to match changes in system variables
    - new variable 'innodb-buffer-pool-in-core-dump' (default: FALSE)
    - new default value 0->8796093022208 in 'innodb-buffer-pool-size-max'
  * New upstream version included fixes for these Debian tracked issues:
    - MDEV-38698 Upgrade did not fix charset and collation for mysql.user,
      leading to "Illegal mix of collations" errors on upgrades or when trying
      to restore backups (Closes: #1104533, #1126850, #1137221)
    - MDEV-39479 Mroonga hangs on invalid index flag (Closes: #1110683)
  * Drop patches included upstream and refresh metadata for easier tracking
  * Use upstream patch from MariaDB 13.0 to use the invoking Unix user's login
    name instead of 'root' when running mytop (Closes: #1109404)
  * Re-add patch to fix build failures on x32
  * Add patch to update TLS test regexes for OpenSSL 4.0
  * Add upstream patch to fix "invalid iv length" with OpenSSL 4.0
    (Closes: #1138309, LP: #2154856)
  * Remove override for deprecated Lintian tag 'exit-in-shared-library'
  * Salsa CI: Disable new uscan test that is not suitable for MariaDB
  * Include new upstream test file pam_mariadb_mtr.so
  * Clean away obsolete Lintian overrides
  * Extend spelling patch to fix new typos introduced in 11.8.7/8
  * Bump Debian Policy version to 4.7.4

  [ Luca Boccassi ]
  * Use dh-sequence-installsysusers instead of manual dependency
  * d/mariadb-server.postinst: sd-sysusers is idempotent

[dgit import unpatched mariadb 1:11.8.8-1]

3 months agoImport mariadb_11.8.8.orig.tar.gz
Otto Kekäläinen [Tue, 2 Jun 2026 00:02:02 +0000 (00:02 +0000)]
Import mariadb_11.8.8.orig.tar.gz

[dgit import orig mariadb_11.8.8.orig.tar.gz]

3 months agoImport mariadb_11.8.8-1.debian.tar.xz
Otto Kekäläinen [Tue, 2 Jun 2026 00:02:02 +0000 (00:02 +0000)]
Import mariadb_11.8.8-1.debian.tar.xz

[dgit import tarball mariadb 1:11.8.8-1 mariadb_11.8.8-1.debian.tar.xz]

5 months agoMerge mariadb (1:11.8.6-6) import into refs/heads/workingbranch
Otto Kekäläinen [Fri, 10 Apr 2026 10:10:10 +0000 (10:10 +0000)]
Merge mariadb (1:11.8.6-6) import into refs/heads/workingbranch

5 months agoAdd AppArmor notice for Debian/Ubuntu users during server startup
Otto Kekäläinen [Wed, 8 Apr 2026 15:32:51 +0000 (23:32 +0800)]
Add AppArmor notice for Debian/Ubuntu users during server startup

When MariaDB fails to start due to permission errors, users on
Debian/Ubuntu might not be able to guess that AppArmor might be the
cause, and they should check for AppArmor denials in the kernel audit
log.

Add an informational message during startup that:
- Only prints when the 'mariadbd' profile is actually loaded
- Includes exact commands from the Debian packaging NEWS
- Provides actionable paths for local overrides
- Mentions both complain and enforce modes for troubleshooting

The message is printed once during normal server startup (not in help or
bootstrap modes) through the existing logging infrastructure, ensuring
it appears in both syslog and the error log where users will see it when
troubleshooting startup failures.

Gbp-Pq: Name Add-AppArmor-notice-for-Debian-Ubuntu-users-during-server.patch

5 months agoUpdate default datadir config to /var/lib/mariadb.
Lena Voytek [Fri, 10 Apr 2026 10:10:10 +0000 (10:10 +0000)]
Update default datadir config to /var/lib/mariadb.

Last-Update: 2026-03-24

Use /var/lib/mariadb as the default datadir for Debian/Ubuntu to improve
co-installability between MySQL and MariaDB servers.
Last-Update: 2026-03-24
Gbp-Pq: Name set-default-datadir-to-var-lib-mariadb.patch

5 months agoMDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features
Aquila Macedo [Mon, 16 Mar 2026 04:09:29 +0000 (01:09 -0300)]
MDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features

collect_mysqld_features probes mariadbd with --datadir=., which can
point to the installed mysql-test tree.

During this probe, mariadbd may run the datadir case-sensitivity check
and try to create a *.lower-test file there. This is a bad fit when the
test suite is run from a read-only installed path (e.g. /usr/share/...).

Use $opt_vardir as the datadir for this probe instead, so it runs in a
writable location and avoids writes into the installed test tree.

This upstream change stemmed from discovering during AppArmor testing that the
mariadb-test-run is writing in the /usr/share/.. path:

    apparmor="DENIED" operation="mknod" ... name="/usr/share/mariadb/mariadb-test/mariadb-aa.lower-test" requested_mask="c"

Origin: https://github.com/MariaDB/server/commit/1ecc1d932a0d89d83c7487da6b34717f10a9b7f5.patch
Forwarded: https://github.com/MariaDB/server/pull/4813

Gbp-Pq: Name MDEV-39082-mysql-test-use-vardir-as-datadir-in-collect_my.patch

5 months ago[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant...
Sergei Golubchik [Fri, 13 Feb 2026 14:22:57 +0000 (15:22 +0100)]
[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant-tables

acl_get_all3() wasn't expecting --skip-grant-tables

Multiple users reported Akonadi crashing with MariaDB 11.8.6. Downgrading to
11.8.5 fixed it. Reason most likely due to upstream regression as described
in detail in bug reports.

Origin: https://github.com/MariaDB/server/commit/87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch
Bug: https://jira.mariadb.org/browse/MDEV-38811
Forwarded: not-needed

Gbp-Pq: Name MDEV-38811-skip-grant-tables-crash.patch

5 months agoAdd safe hardening to mariadb.service units
Aquila Macedo [Fri, 16 Jan 2026 00:53:16 +0000 (19:53 -0500)]
Add safe hardening to mariadb.service units

Add low regression systemd hardening directives to mariadb.service and
mariadb@.service to improve 'systemd-analyze security' without touching
the historically-problematic areas (capability bounding /
NoNewPrivileges / PrivateDevices). Refs: MDEV-10404, MDEV-19878,
MDEV-36591, MDEV-36681

Includes kernel/cgroup protections, disables realtime scheduling, locks
personality, and restricts namespace creation (overrideable via drop-in)

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name systemd-hardening-safe-defaults.patch

5 months agosysusers.d: lock mysql user and keep Debian home/shell
Aquila Macedo [Fri, 9 Jan 2026 00:34:26 +0000 (21:34 -0300)]
sysusers.d: lock mysql user and keep Debian home/shell

Use u! and set HOME=/nonexistent and shell=/bin/false for the mysql
user.

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name sysusers-lock-mysql-account.patch

5 months agoMake the new merge_alter test indifferent to extra version info
Otto Kekäläinen [Thu, 27 Nov 2025 00:49:24 +0000 (16:49 -0800)]
Make the new merge_alter test indifferent to extra version info

Modify the test regex to accept any extra version info, just like it
accepts any server version info. The test is supposed to fail on actual
differences in behaviour and server info strings are intentionally
normalized and not regarded.

Without this modification, the test introduced in 9e8e215e would fail
in post-build MTR on "from Debian-log" and in autopkgtest on "from Debian":

    main.merge_alter                         w4 [ fail ]
            Test ended at 2025-11-26 22:41:38
    CURRENT_TEST: main.merge_alter
    /usr/share/mariadb/mariadb-test/main/merge_alter.result 2025-11-13 11:45:29.000000000 +0300
    /tmp/tmp.3vGjZWHA79/var/4/log/merge_alter.reject 2025-11-27 01:41:38.523996124 +0300
    @@ -10,7 +10,7 @@
     /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
     DELIMITER /*!*/;
     # at #
    -#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
    +#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## from Debian created 010909  4:46:40 at startup
     ROLLBACK/*!*/;
     # at #
     #010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Gtid list []
    Result length mismatch

Forwarded: not-needed

Gbp-Pq: Name include-debian-in-test-merge-alter-result.patch

5 months agoSuppress native AIO warning introduced in 10.8.3
Otto Kekäläinen [Fri, 8 Aug 2025 04:30:51 +0000 (21:30 -0700)]
Suppress native AIO warning introduced in 10.8.3

Upstream a87bb96 introduced a new warning, visible at least on all ppc64el and
s390x builds which makes the post-build mariadb-test-test fail:

    [Warning] InnoDB: native AIO failed: falling back to
    innodb_use_native_aio=OFF

The case of this is the ci environment only where there is insufficent
fs.aio-max-nr configured. A such we are adding a suppression to the
mtr only. The warning is valuable for users. Upstream MDEV-37411 has
added a io_setup as a warning, which will fail in the CI environment,
so we're pre-emptively suppressing this warning too.

Unlike upstream MariaDB, in Debian we removed libaio in for Linux on
MariaDB 10.6+ in 612630c6 and completely in 1d648d6f. This was re-added
by upstream added a system variable innodb_linux_aio to control, and
also provided automated fallback. As such we're readding it back too.

With liburing still seccomp filterer in container environments having
a libaio fallback is more valuable than the threads implementation of
last resort.

Edited & Updated: Daniel Black <daniel@mariabdb.org>

Upstream rejected this with the conclusion, is that it will start working in
Debian/Salsa/Ubuntu/Launchpad once the Linux kernel is new enough to handle the
I/O calls and fallbacks properly, or once the CI system increases the value of
/proc/sys/fs/aio-max-nr to 1 million or so, to allow multiple parallel MariaDB
servers (as started by mariadb-test-run) each have enough quota for native AIO
to work.

Forwarded: https://jira.mariadb.org/browse/MDEV-37411 (rejected)

Gbp-Pq: Name MDEV-37411-suppress-new-warning-about-native-aio.patch

5 months agoImprove output from mariadb-secure-installation to be more honest
Otto Kekäläinen [Wed, 4 Jun 2025 11:46:31 +0000 (14:46 +0300)]
Improve output from mariadb-secure-installation to be more honest

The script is not useful in Debian, and likely misleading to users.
Improve the output to be more clear about what it is doing or is not
doing.

Merged on 'main' in
https://github.com/MariaDB/server/commit/3a08a8e3d2212f3f60937b3fd97207c3ea7b933a
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4457

Gbp-Pq: Name Improve-output-from-mariadb-secure-installation-to-be-mor.patch

5 months agoFix misc spelling in MariaDB Server repository
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Fix misc spelling in MariaDB Server repository

This is a combined patch of various spelling fixes.

* Fix misc typos in MariaDB Server

* Fix spelling of 'allows one to'

  Fix the following Lintian nags introduced in commit
  c8d040938a7ebe10e62506a726702c5990ef4dda:

  I: mariadb-backup: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-backup]
  I: mariadb-server-core: spelling-error-in-binary "allows to" "allows one to" [usr/sbin/mariadbd]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-client-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/test-connect-t]

* Fix typo: Enrypt->Encrypt

Merged in https://github.com/MariaDB/server/commit/5879c85f505d3a11d4b8f479f2437416d8a1d724
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4458

Gbp-Pq: Name Fix-misc-spelling-in-MariaDB-Server-repository.patch

5 months agoDisable the 'mysql*' command deprecation warning
Otto Kekalainen [Sun, 30 Jun 2024 15:18:06 +0000 (15:18 +0000)]
Disable the 'mysql*' command deprecation warning

Many command-line tools expect the commands they run to return without
any output in stderr or having error codes. The fact that now in MariaDB
11.4 all 'mysql*' commands emit a deprecation warning causes a lot of
scripts to fail, such as the /etc/init.d/mariadb itself and many dependent
programs as witnessed via Debian autopkgtests. See examples below.

https://ci.debian.net/packages/m/mariadb-connector-odbc/testing/amd64/48373500/
https://ci.debian.net/packages/p/pam-mysql/testing/amd64/48373511/
https://ci.debian.net/packages/r/roundcube/testing/amd64/48373518/

Forwarded: not-needed

Gbp-Pq: Name hide-mysql-command-deprecation-warnings.patch

5 months agoShow banner in server and client startup to drive community engagement
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Show banner in server and client startup to drive community engagement

Suggest to users that they can support MariaDB development by simply giving a
star on GitHub. This patch experiments with how well such a banner works, and
may later change the contents to drive some other kind of engagement.

Client output:

    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 17
    Server version: 11.8.1-MariaDB-5 from Debian -- Please help get to 10k stars at https://github.com/MariaDB/Server

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>

Server output:
    [Note] Please help get to 10k stars at https://github.com/MariaDB/Server

Server output if built in git directory:
    [Note] Starting MariaDB 11.8.1-MariaDB-5 from Debian source revision 1a9c3debfd6b1b16af4e501d3530b866b85c38a8 server_uid eNAjF8/wvUNM09/mSmh+k3a5o5w= as process 1359

Logs will also show as server output:
    mysqld: Version: '11.8.1-MariaDB-5 from Debian'  socket: '/run/mysqld/mysqld.sock'  port: 3306  -- Please help get to 10k stars at https://github.com/MariaDB/Server

This patch can be dropped if Debian updates to ship

Something similar was merged in https://github.com/MariaDB/server/commit/346c7afe9b7071ce9c47892a83d69944b608b3da
and thus included in MariaDB 12.3 onward.

Forwarded: not-needed

Gbp-Pq: Name startup-message.patch

5 months agoInstall PAM modules and systemd units into /usr
Michael Biebl [Mon, 22 Jan 2024 21:52:25 +0000 (22:52 +0100)]
Install PAM modules and systemd units into /usr

Since Debian trixie all files need to be installed into their canonical
location under /usr.

Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061348
Forwarded: https://github.com/MariaDB/server/pull/4065

Gbp-Pq: Name install-files-into-usr.patch

5 months agocmake: add support for reproducible buildS
Sutou Kouhei [Sat, 5 Feb 2022 02:05:39 +0000 (11:05 +0900)]
cmake: add support for reproducible buildS

We should use relative path not absolute path. We can use target without
breaking reproducibility.

This patch can be removed once MariaDB ships with Mroonga v12.00+ that has
https://github.com/mroonga/mroonga/commit/27caeb9b8ce7fa432b1251eca475b517c6902a6c

Origin: https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927
Bug: https://github.com/mroonga/mroonga/issues/298
Forwarded: not-needed

Gbp-Pq: Name mroonga-mrn-lib-dirs-path-reproducible-build.patch

5 months agoFix perl path in scripts
Otto Kekalainen [Sun, 20 Dec 2020 18:58:42 +0000 (20:58 +0200)]
Fix perl path in scripts

Fix Lintian issue https://lintian.debian.org/tags/incorrect-path-for-interpreter.html

Upstream will never accept this patch,
see https://github.com/MariaDB/server/pull/1718

Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/1718.patch
Forwarded: https://github.com/MariaDB/server/pull/1718 (rejected, will never be merged)

Gbp-Pq: Name env-perl-usr-bin-perl.patch

5 months agomariadb (1:11.8.6-6) unstable; urgency=medium
Otto Kekäläinen [Fri, 10 Apr 2026 10:10:10 +0000 (10:10 +0000)]
mariadb (1:11.8.6-6) unstable; urgency=medium

  [ Lena Voytek ]
  * Salsa CI: Update simple upgrade test to expect use of /var/lib/mariadb

  [ Otto Kekäläinen ]
  * Extend docs in NEWS item based on real AppArmor profile use feedback
  * Extend AppArmor profile based on real 'enforce' mode use feedback
    (Closes: #1131915, #1132027)
  * Extend AppArmor profile to allow Galera helpers (Closes: #1131938)
  * Add AppArmor notice for Debian/Ubuntu users during server startup

[dgit import unpatched mariadb 1:11.8.6-6]

5 months agoImport mariadb_11.8.6-6.debian.tar.xz
Otto Kekäläinen [Fri, 10 Apr 2026 10:10:10 +0000 (10:10 +0000)]
Import mariadb_11.8.6-6.debian.tar.xz

[dgit import tarball mariadb 1:11.8.6-6 mariadb_11.8.6-6.debian.tar.xz]

5 months agoMerge mariadb (1:11.8.6-5) import into refs/heads/workingbranch
Lena Voytek [Tue, 24 Mar 2026 13:26:38 +0000 (09:26 -0400)]
Merge mariadb (1:11.8.6-5) import into refs/heads/workingbranch

5 months agoUpdate default datadir config to /var/lib/mariadb.
Lena Voytek [Tue, 24 Mar 2026 13:26:38 +0000 (09:26 -0400)]
Update default datadir config to /var/lib/mariadb.

Last-Update: 2026-03-24

Use /var/lib/mariadb as the default datadir for Debian/Ubuntu to improve
co-installability between MySQL and MariaDB servers.
Last-Update: 2026-03-24
Gbp-Pq: Name set-default-datadir-to-var-lib-mariadb.patch

5 months agoMDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features
Aquila Macedo [Mon, 16 Mar 2026 04:09:29 +0000 (01:09 -0300)]
MDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features

collect_mysqld_features probes mariadbd with --datadir=., which can
point to the installed mysql-test tree.

During this probe, mariadbd may run the datadir case-sensitivity check
and try to create a *.lower-test file there. This is a bad fit when the
test suite is run from a read-only installed path (e.g. /usr/share/...).

Use $opt_vardir as the datadir for this probe instead, so it runs in a
writable location and avoids writes into the installed test tree.

This upstream change stemmed from discovering during AppArmor testing that the
mariadb-test-run is writing in the /usr/share/.. path:

    apparmor="DENIED" operation="mknod" ... name="/usr/share/mariadb/mariadb-test/mariadb-aa.lower-test" requested_mask="c"

Origin: https://github.com/MariaDB/server/commit/1ecc1d932a0d89d83c7487da6b34717f10a9b7f5.patch
Forwarded: https://github.com/MariaDB/server/pull/4813

Gbp-Pq: Name MDEV-39082-mysql-test-use-vardir-as-datadir-in-collect_my.patch

5 months ago[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant...
Sergei Golubchik [Fri, 13 Feb 2026 14:22:57 +0000 (15:22 +0100)]
[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant-tables

acl_get_all3() wasn't expecting --skip-grant-tables

Multiple users reported Akonadi crashing with MariaDB 11.8.6. Downgrading to
11.8.5 fixed it. Reason most likely due to upstream regression as described
in detail in bug reports.

Origin: https://github.com/MariaDB/server/commit/87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch
Bug: https://jira.mariadb.org/browse/MDEV-38811
Forwarded: not-needed

Gbp-Pq: Name MDEV-38811-skip-grant-tables-crash.patch

5 months agoAdd safe hardening to mariadb.service units
Aquila Macedo [Fri, 16 Jan 2026 00:53:16 +0000 (19:53 -0500)]
Add safe hardening to mariadb.service units

Add low regression systemd hardening directives to mariadb.service and
mariadb@.service to improve 'systemd-analyze security' without touching
the historically-problematic areas (capability bounding /
NoNewPrivileges / PrivateDevices). Refs: MDEV-10404, MDEV-19878,
MDEV-36591, MDEV-36681

Includes kernel/cgroup protections, disables realtime scheduling, locks
personality, and restricts namespace creation (overrideable via drop-in)

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name systemd-hardening-safe-defaults.patch

5 months agosysusers.d: lock mysql user and keep Debian home/shell
Aquila Macedo [Fri, 9 Jan 2026 00:34:26 +0000 (21:34 -0300)]
sysusers.d: lock mysql user and keep Debian home/shell

Use u! and set HOME=/nonexistent and shell=/bin/false for the mysql
user.

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name sysusers-lock-mysql-account.patch

5 months agoMake the new merge_alter test indifferent to extra version info
Otto Kekäläinen [Thu, 27 Nov 2025 00:49:24 +0000 (16:49 -0800)]
Make the new merge_alter test indifferent to extra version info

Modify the test regex to accept any extra version info, just like it
accepts any server version info. The test is supposed to fail on actual
differences in behaviour and server info strings are intentionally
normalized and not regarded.

Without this modification, the test introduced in 9e8e215e would fail
in post-build MTR on "from Debian-log" and in autopkgtest on "from Debian":

    main.merge_alter                         w4 [ fail ]
            Test ended at 2025-11-26 22:41:38
    CURRENT_TEST: main.merge_alter
    /usr/share/mariadb/mariadb-test/main/merge_alter.result 2025-11-13 11:45:29.000000000 +0300
    /tmp/tmp.3vGjZWHA79/var/4/log/merge_alter.reject 2025-11-27 01:41:38.523996124 +0300
    @@ -10,7 +10,7 @@
     /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
     DELIMITER /*!*/;
     # at #
    -#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
    +#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## from Debian created 010909  4:46:40 at startup
     ROLLBACK/*!*/;
     # at #
     #010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Gtid list []
    Result length mismatch

Forwarded: not-needed

Gbp-Pq: Name include-debian-in-test-merge-alter-result.patch

5 months agoSuppress native AIO warning introduced in 10.8.3
Otto Kekäläinen [Fri, 8 Aug 2025 04:30:51 +0000 (21:30 -0700)]
Suppress native AIO warning introduced in 10.8.3

Upstream a87bb96 introduced a new warning, visible at least on all ppc64el and
s390x builds which makes the post-build mariadb-test-test fail:

    [Warning] InnoDB: native AIO failed: falling back to
    innodb_use_native_aio=OFF

The case of this is the ci environment only where there is insufficent
fs.aio-max-nr configured. A such we are adding a suppression to the
mtr only. The warning is valuable for users. Upstream MDEV-37411 has
added a io_setup as a warning, which will fail in the CI environment,
so we're pre-emptively suppressing this warning too.

Unlike upstream MariaDB, in Debian we removed libaio in for Linux on
MariaDB 10.6+ in 612630c6 and completely in 1d648d6f. This was re-added
by upstream added a system variable innodb_linux_aio to control, and
also provided automated fallback. As such we're readding it back too.

With liburing still seccomp filterer in container environments having
a libaio fallback is more valuable than the threads implementation of
last resort.

Edited & Updated: Daniel Black <daniel@mariabdb.org>

Upstream rejected this with the conclusion, is that it will start working in
Debian/Salsa/Ubuntu/Launchpad once the Linux kernel is new enough to handle the
I/O calls and fallbacks properly, or once the CI system increases the value of
/proc/sys/fs/aio-max-nr to 1 million or so, to allow multiple parallel MariaDB
servers (as started by mariadb-test-run) each have enough quota for native AIO
to work.

Forwarded: https://jira.mariadb.org/browse/MDEV-37411 (rejected)

Gbp-Pq: Name MDEV-37411-suppress-new-warning-about-native-aio.patch

5 months agoImprove output from mariadb-secure-installation to be more honest
Otto Kekäläinen [Wed, 4 Jun 2025 11:46:31 +0000 (14:46 +0300)]
Improve output from mariadb-secure-installation to be more honest

The script is not useful in Debian, and likely misleading to users.
Improve the output to be more clear about what it is doing or is not
doing.

Merged on 'main' in
https://github.com/MariaDB/server/commit/3a08a8e3d2212f3f60937b3fd97207c3ea7b933a
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4457

Gbp-Pq: Name Improve-output-from-mariadb-secure-installation-to-be-mor.patch

5 months agoFix misc spelling in MariaDB Server repository
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Fix misc spelling in MariaDB Server repository

This is a combined patch of various spelling fixes.

* Fix misc typos in MariaDB Server

* Fix spelling of 'allows one to'

  Fix the following Lintian nags introduced in commit
  c8d040938a7ebe10e62506a726702c5990ef4dda:

  I: mariadb-backup: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-backup]
  I: mariadb-server-core: spelling-error-in-binary "allows to" "allows one to" [usr/sbin/mariadbd]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-client-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/test-connect-t]

* Fix typo: Enrypt->Encrypt

Merged in https://github.com/MariaDB/server/commit/5879c85f505d3a11d4b8f479f2437416d8a1d724
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4458

Gbp-Pq: Name Fix-misc-spelling-in-MariaDB-Server-repository.patch

5 months agoDisable the 'mysql*' command deprecation warning
Otto Kekalainen [Sun, 30 Jun 2024 15:18:06 +0000 (15:18 +0000)]
Disable the 'mysql*' command deprecation warning

Many command-line tools expect the commands they run to return without
any output in stderr or having error codes. The fact that now in MariaDB
11.4 all 'mysql*' commands emit a deprecation warning causes a lot of
scripts to fail, such as the /etc/init.d/mariadb itself and many dependent
programs as witnessed via Debian autopkgtests. See examples below.

https://ci.debian.net/packages/m/mariadb-connector-odbc/testing/amd64/48373500/
https://ci.debian.net/packages/p/pam-mysql/testing/amd64/48373511/
https://ci.debian.net/packages/r/roundcube/testing/amd64/48373518/

Forwarded: not-needed

Gbp-Pq: Name hide-mysql-command-deprecation-warnings.patch

5 months agoShow banner in server and client startup to drive community engagement
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Show banner in server and client startup to drive community engagement

Suggest to users that they can support MariaDB development by simply giving a
star on GitHub. This patch experiments with how well such a banner works, and
may later change the contents to drive some other kind of engagement.

Client output:

    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 17
    Server version: 11.8.1-MariaDB-5 from Debian -- Please help get to 10k stars at https://github.com/MariaDB/Server

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>

Server output:
    [Note] Please help get to 10k stars at https://github.com/MariaDB/Server

Server output if built in git directory:
    [Note] Starting MariaDB 11.8.1-MariaDB-5 from Debian source revision 1a9c3debfd6b1b16af4e501d3530b866b85c38a8 server_uid eNAjF8/wvUNM09/mSmh+k3a5o5w= as process 1359

Logs will also show as server output:
    mysqld: Version: '11.8.1-MariaDB-5 from Debian'  socket: '/run/mysqld/mysqld.sock'  port: 3306  -- Please help get to 10k stars at https://github.com/MariaDB/Server

This patch can be dropped if Debian updates to ship

Something similar was merged in https://github.com/MariaDB/server/commit/346c7afe9b7071ce9c47892a83d69944b608b3da
and thus included in MariaDB 12.3 onward.

Forwarded: not-needed

Gbp-Pq: Name startup-message.patch

5 months agoInstall PAM modules and systemd units into /usr
Michael Biebl [Mon, 22 Jan 2024 21:52:25 +0000 (22:52 +0100)]
Install PAM modules and systemd units into /usr

Since Debian trixie all files need to be installed into their canonical
location under /usr.

Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061348
Forwarded: https://github.com/MariaDB/server/pull/4065

Gbp-Pq: Name install-files-into-usr.patch

5 months agocmake: add support for reproducible buildS
Sutou Kouhei [Sat, 5 Feb 2022 02:05:39 +0000 (11:05 +0900)]
cmake: add support for reproducible buildS

We should use relative path not absolute path. We can use target without
breaking reproducibility.

This patch can be removed once MariaDB ships with Mroonga v12.00+ that has
https://github.com/mroonga/mroonga/commit/27caeb9b8ce7fa432b1251eca475b517c6902a6c

Origin: https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927
Bug: https://github.com/mroonga/mroonga/issues/298
Forwarded: not-needed

Gbp-Pq: Name mroonga-mrn-lib-dirs-path-reproducible-build.patch

5 months agoFix perl path in scripts
Otto Kekalainen [Sun, 20 Dec 2020 18:58:42 +0000 (20:58 +0200)]
Fix perl path in scripts

Fix Lintian issue https://lintian.debian.org/tags/incorrect-path-for-interpreter.html

Upstream will never accept this patch,
see https://github.com/MariaDB/server/pull/1718

Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/1718.patch
Forwarded: https://github.com/MariaDB/server/pull/1718 (rejected, will never be merged)

Gbp-Pq: Name env-perl-usr-bin-perl.patch

5 months agomariadb (1:11.8.6-5) unstable; urgency=medium
Lena Voytek [Tue, 24 Mar 2026 13:26:38 +0000 (09:26 -0400)]
mariadb (1:11.8.6-5) unstable; urgency=medium

  * New mariadb-server installs will now use /var/lib/mariadb as the default
    data directory. See NEWS for details.
    - Determine whether to use /var/lib/mysql or /var/lib/mariadb during
      mariadb-server preinst and postinst.
    - On purge, remove /var/lib/mariadb, and /var/lib/mysql only if owned by
      mariadb.
    - d/p/set-default-datadir-to-var-lib-mariadb.patch: Update compile-time
      INSTALL_MYSQLDATADIR_DEB setting to /var/lib/mariadb.
    - d/mariadb-server.mariadb.init: Default to /var/lib/mariadb if datadir is
      not specified in config.
    - d/additions/50-server.cnf: Update default datadir in comment to
      /var/lib/mariadb.
    - Update autopkgtests to match new data directory expectations.
    - Apport: Include /var/lib/mariadb data directory info in report.
    - Salsa CI: Confirm correct datadir is in use for each test and add list of
      /var/lib/mariadb files as test artifact.
  * Use mariadb_upgrade_info/mysql_upgrade_info version files instead of
    generated flag files to detect active data directory and downgrade
    attempts.

[dgit import unpatched mariadb 1:11.8.6-5]

5 months agoImport mariadb_11.8.6-5.debian.tar.xz
Lena Voytek [Tue, 24 Mar 2026 13:26:38 +0000 (09:26 -0400)]
Import mariadb_11.8.6-5.debian.tar.xz

[dgit import tarball mariadb 1:11.8.6-5 mariadb_11.8.6-5.debian.tar.xz]

5 months agoMerge mariadb (1:11.8.6-4) import into refs/heads/workingbranch
Otto Kekäläinen [Thu, 19 Mar 2026 13:13:13 +0000 (13:13 +0000)]
Merge mariadb (1:11.8.6-4) import into refs/heads/workingbranch

5 months agoMDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features
Aquila Macedo [Mon, 16 Mar 2026 04:09:29 +0000 (01:09 -0300)]
MDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features

collect_mysqld_features probes mariadbd with --datadir=., which can
point to the installed mysql-test tree.

During this probe, mariadbd may run the datadir case-sensitivity check
and try to create a *.lower-test file there. This is a bad fit when the
test suite is run from a read-only installed path (e.g. /usr/share/...).

Use $opt_vardir as the datadir for this probe instead, so it runs in a
writable location and avoids writes into the installed test tree.

This upstream change stemmed from discovering during AppArmor testing that the
mariadb-test-run is writing in the /usr/share/.. path:

    apparmor="DENIED" operation="mknod" ... name="/usr/share/mariadb/mariadb-test/mariadb-aa.lower-test" requested_mask="c"

Origin: https://github.com/MariaDB/server/commit/1ecc1d932a0d89d83c7487da6b34717f10a9b7f5.patch
Forwarded: https://github.com/MariaDB/server/pull/4813

Gbp-Pq: Name MDEV-39082-mysql-test-use-vardir-as-datadir-in-collect_my.patch

5 months ago[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant...
Sergei Golubchik [Fri, 13 Feb 2026 14:22:57 +0000 (15:22 +0100)]
[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant-tables

acl_get_all3() wasn't expecting --skip-grant-tables

Multiple users reported Akonadi crashing with MariaDB 11.8.6. Downgrading to
11.8.5 fixed it. Reason most likely due to upstream regression as described
in detail in bug reports.

Origin: https://github.com/MariaDB/server/commit/87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch
Bug: https://jira.mariadb.org/browse/MDEV-38811
Forwarded: not-needed

Gbp-Pq: Name MDEV-38811-skip-grant-tables-crash.patch

5 months agoAdd safe hardening to mariadb.service units
Aquila Macedo [Fri, 16 Jan 2026 00:53:16 +0000 (19:53 -0500)]
Add safe hardening to mariadb.service units

Add low regression systemd hardening directives to mariadb.service and
mariadb@.service to improve 'systemd-analyze security' without touching
the historically-problematic areas (capability bounding /
NoNewPrivileges / PrivateDevices). Refs: MDEV-10404, MDEV-19878,
MDEV-36591, MDEV-36681

Includes kernel/cgroup protections, disables realtime scheduling, locks
personality, and restricts namespace creation (overrideable via drop-in)

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name systemd-hardening-safe-defaults.patch

5 months agosysusers.d: lock mysql user and keep Debian home/shell
Aquila Macedo [Fri, 9 Jan 2026 00:34:26 +0000 (21:34 -0300)]
sysusers.d: lock mysql user and keep Debian home/shell

Use u! and set HOME=/nonexistent and shell=/bin/false for the mysql
user.

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name sysusers-lock-mysql-account.patch

5 months agoMake the new merge_alter test indifferent to extra version info
Otto Kekäläinen [Thu, 27 Nov 2025 00:49:24 +0000 (16:49 -0800)]
Make the new merge_alter test indifferent to extra version info

Modify the test regex to accept any extra version info, just like it
accepts any server version info. The test is supposed to fail on actual
differences in behaviour and server info strings are intentionally
normalized and not regarded.

Without this modification, the test introduced in 9e8e215e would fail
in post-build MTR on "from Debian-log" and in autopkgtest on "from Debian":

    main.merge_alter                         w4 [ fail ]
            Test ended at 2025-11-26 22:41:38
    CURRENT_TEST: main.merge_alter
    /usr/share/mariadb/mariadb-test/main/merge_alter.result 2025-11-13 11:45:29.000000000 +0300
    /tmp/tmp.3vGjZWHA79/var/4/log/merge_alter.reject 2025-11-27 01:41:38.523996124 +0300
    @@ -10,7 +10,7 @@
     /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
     DELIMITER /*!*/;
     # at #
    -#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
    +#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## from Debian created 010909  4:46:40 at startup
     ROLLBACK/*!*/;
     # at #
     #010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Gtid list []
    Result length mismatch

Forwarded: not-needed

Gbp-Pq: Name include-debian-in-test-merge-alter-result.patch

5 months agoSuppress native AIO warning introduced in 10.8.3
Otto Kekäläinen [Fri, 8 Aug 2025 04:30:51 +0000 (21:30 -0700)]
Suppress native AIO warning introduced in 10.8.3

Upstream a87bb96 introduced a new warning, visible at least on all ppc64el and
s390x builds which makes the post-build mariadb-test-test fail:

    [Warning] InnoDB: native AIO failed: falling back to
    innodb_use_native_aio=OFF

The case of this is the ci environment only where there is insufficent
fs.aio-max-nr configured. A such we are adding a suppression to the
mtr only. The warning is valuable for users. Upstream MDEV-37411 has
added a io_setup as a warning, which will fail in the CI environment,
so we're pre-emptively suppressing this warning too.

Unlike upstream MariaDB, in Debian we removed libaio in for Linux on
MariaDB 10.6+ in 612630c6 and completely in 1d648d6f. This was re-added
by upstream added a system variable innodb_linux_aio to control, and
also provided automated fallback. As such we're readding it back too.

With liburing still seccomp filterer in container environments having
a libaio fallback is more valuable than the threads implementation of
last resort.

Edited & Updated: Daniel Black <daniel@mariabdb.org>

Upstream rejected this with the conclusion, is that it will start working in
Debian/Salsa/Ubuntu/Launchpad once the Linux kernel is new enough to handle the
I/O calls and fallbacks properly, or once the CI system increases the value of
/proc/sys/fs/aio-max-nr to 1 million or so, to allow multiple parallel MariaDB
servers (as started by mariadb-test-run) each have enough quota for native AIO
to work.

Forwarded: https://jira.mariadb.org/browse/MDEV-37411 (rejected)

Gbp-Pq: Name MDEV-37411-suppress-new-warning-about-native-aio.patch

5 months agoImprove output from mariadb-secure-installation to be more honest
Otto Kekäläinen [Wed, 4 Jun 2025 11:46:31 +0000 (14:46 +0300)]
Improve output from mariadb-secure-installation to be more honest

The script is not useful in Debian, and likely misleading to users.
Improve the output to be more clear about what it is doing or is not
doing.

Merged on 'main' in
https://github.com/MariaDB/server/commit/3a08a8e3d2212f3f60937b3fd97207c3ea7b933a
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4457

Gbp-Pq: Name Improve-output-from-mariadb-secure-installation-to-be-mor.patch

5 months agoFix misc spelling in MariaDB Server repository
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Fix misc spelling in MariaDB Server repository

This is a combined patch of various spelling fixes.

* Fix misc typos in MariaDB Server

* Fix spelling of 'allows one to'

  Fix the following Lintian nags introduced in commit
  c8d040938a7ebe10e62506a726702c5990ef4dda:

  I: mariadb-backup: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-backup]
  I: mariadb-server-core: spelling-error-in-binary "allows to" "allows one to" [usr/sbin/mariadbd]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-client-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/test-connect-t]

* Fix typo: Enrypt->Encrypt

Merged in https://github.com/MariaDB/server/commit/5879c85f505d3a11d4b8f479f2437416d8a1d724
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4458

Gbp-Pq: Name Fix-misc-spelling-in-MariaDB-Server-repository.patch

5 months agoDisable the 'mysql*' command deprecation warning
Otto Kekalainen [Sun, 30 Jun 2024 15:18:06 +0000 (15:18 +0000)]
Disable the 'mysql*' command deprecation warning

Many command-line tools expect the commands they run to return without
any output in stderr or having error codes. The fact that now in MariaDB
11.4 all 'mysql*' commands emit a deprecation warning causes a lot of
scripts to fail, such as the /etc/init.d/mariadb itself and many dependent
programs as witnessed via Debian autopkgtests. See examples below.

https://ci.debian.net/packages/m/mariadb-connector-odbc/testing/amd64/48373500/
https://ci.debian.net/packages/p/pam-mysql/testing/amd64/48373511/
https://ci.debian.net/packages/r/roundcube/testing/amd64/48373518/

Forwarded: not-needed

Gbp-Pq: Name hide-mysql-command-deprecation-warnings.patch

5 months agoShow banner in server and client startup to drive community engagement
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Show banner in server and client startup to drive community engagement

Suggest to users that they can support MariaDB development by simply giving a
star on GitHub. This patch experiments with how well such a banner works, and
may later change the contents to drive some other kind of engagement.

Client output:

    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 17
    Server version: 11.8.1-MariaDB-5 from Debian -- Please help get to 10k stars at https://github.com/MariaDB/Server

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>

Server output:
    [Note] Please help get to 10k stars at https://github.com/MariaDB/Server

Server output if built in git directory:
    [Note] Starting MariaDB 11.8.1-MariaDB-5 from Debian source revision 1a9c3debfd6b1b16af4e501d3530b866b85c38a8 server_uid eNAjF8/wvUNM09/mSmh+k3a5o5w= as process 1359

Logs will also show as server output:
    mysqld: Version: '11.8.1-MariaDB-5 from Debian'  socket: '/run/mysqld/mysqld.sock'  port: 3306  -- Please help get to 10k stars at https://github.com/MariaDB/Server

This patch can be dropped if Debian updates to ship

Something similar was merged in https://github.com/MariaDB/server/commit/346c7afe9b7071ce9c47892a83d69944b608b3da
and thus included in MariaDB 12.3 onward.

Forwarded: not-needed

Gbp-Pq: Name startup-message.patch

5 months agoInstall PAM modules and systemd units into /usr
Michael Biebl [Mon, 22 Jan 2024 21:52:25 +0000 (22:52 +0100)]
Install PAM modules and systemd units into /usr

Since Debian trixie all files need to be installed into their canonical
location under /usr.

Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061348
Forwarded: https://github.com/MariaDB/server/pull/4065

Gbp-Pq: Name install-files-into-usr.patch

5 months agocmake: add support for reproducible buildS
Sutou Kouhei [Sat, 5 Feb 2022 02:05:39 +0000 (11:05 +0900)]
cmake: add support for reproducible buildS

We should use relative path not absolute path. We can use target without
breaking reproducibility.

This patch can be removed once MariaDB ships with Mroonga v12.00+ that has
https://github.com/mroonga/mroonga/commit/27caeb9b8ce7fa432b1251eca475b517c6902a6c

Origin: https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927
Bug: https://github.com/mroonga/mroonga/issues/298
Forwarded: not-needed

Gbp-Pq: Name mroonga-mrn-lib-dirs-path-reproducible-build.patch

5 months agoFix perl path in scripts
Otto Kekalainen [Sun, 20 Dec 2020 18:58:42 +0000 (20:58 +0200)]
Fix perl path in scripts

Fix Lintian issue https://lintian.debian.org/tags/incorrect-path-for-interpreter.html

Upstream will never accept this patch,
see https://github.com/MariaDB/server/pull/1718

Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/1718.patch
Forwarded: https://github.com/MariaDB/server/pull/1718 (rejected, will never be merged)

Gbp-Pq: Name env-perl-usr-bin-perl.patch

5 months agomariadb (1:11.8.6-4) unstable; urgency=medium
Otto Kekäläinen [Thu, 19 Mar 2026 13:13:13 +0000 (13:13 +0000)]
mariadb (1:11.8.6-4) unstable; urgency=medium

  * New AppArmor for mariadbd now in 'enforce' mode. See NEWS for details.
  * Additional refinement to make the AppArmor and related autopkgtest as
    robust as possible:
    - Add patch to have mariadb-test-run not write in
      /usr/share/mariadb/mariadb-test/ to not violate the AppArmor profile
    - Normalize variables 'aria-checkpoint-interval' and 'aria-recover-options'
      to documented defaults as they seem to be effect in Ubuntu binaries now,
      while Debian binaries seem to default to zero and empty for an unknown
      reason.
    - Ensure AppArmor diagnostics run even when autopkgtests fail to catch
      potential situations where autopkgtests job 'upstream' violated the
      AppArmor profile.
    - Simplify AppArmor profile, allow 'mariadb' aliases and unify indentation.
    - Extend AppArmor profile to cover all easily testable features
      (Closes: #1130272).

[dgit import unpatched mariadb 1:11.8.6-4]

5 months agoImport mariadb_11.8.6-4.debian.tar.xz
Otto Kekäläinen [Thu, 19 Mar 2026 13:13:13 +0000 (13:13 +0000)]
Import mariadb_11.8.6-4.debian.tar.xz

[dgit import tarball mariadb 1:11.8.6-4 mariadb_11.8.6-4.debian.tar.xz]

6 months agoMerge mariadb (1:11.8.6-2) import into refs/heads/workingbranch
Otto Kekäläinen [Thu, 19 Feb 2026 08:08:08 +0000 (08:08 +0000)]
Merge mariadb (1:11.8.6-2) import into refs/heads/workingbranch

6 months ago[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant...
Sergei Golubchik [Fri, 13 Feb 2026 14:22:57 +0000 (15:22 +0100)]
[PATCH] MDEV-38811 crash in information_schema.table_constraints when --skip-grant-tables

acl_get_all3() wasn't expecting --skip-grant-tables

Multiple users reported Akonadi crashing with MariaDB 11.8.6. Downgrading to
11.8.5 fixed it. Reason most likely due to upstream regression as described
in detail in bug reports.

Origin: https://github.com/MariaDB/server/commit/87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch
Bug: https://jira.mariadb.org/browse/MDEV-38811
Forwarded: not-needed

Gbp-Pq: Name MDEV-38811-skip-grant-tables-crash.patch

6 months agoAdd safe hardening to mariadb.service units
Aquila Macedo [Fri, 16 Jan 2026 00:53:16 +0000 (19:53 -0500)]
Add safe hardening to mariadb.service units

Add low regression systemd hardening directives to mariadb.service and
mariadb@.service to improve 'systemd-analyze security' without touching
the historically-problematic areas (capability bounding /
NoNewPrivileges / PrivateDevices). Refs: MDEV-10404, MDEV-19878,
MDEV-36591, MDEV-36681

Includes kernel/cgroup protections, disables realtime scheduling, locks
personality, and restricts namespace creation (overrideable via drop-in)

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name systemd-hardening-safe-defaults.patch

6 months agosysusers.d: lock mysql user and keep Debian home/shell
Aquila Macedo [Fri, 9 Jan 2026 00:34:26 +0000 (21:34 -0300)]
sysusers.d: lock mysql user and keep Debian home/shell

Use u! and set HOME=/nonexistent and shell=/bin/false for the mysql
user.

This patch should be submitted upstream once proven stable in Debian.

Forwarded: no

Gbp-Pq: Name sysusers-lock-mysql-account.patch

6 months agoMake the new merge_alter test indifferent to extra version info
Otto Kekäläinen [Thu, 27 Nov 2025 00:49:24 +0000 (16:49 -0800)]
Make the new merge_alter test indifferent to extra version info

Modify the test regex to accept any extra version info, just like it
accepts any server version info. The test is supposed to fail on actual
differences in behaviour and server info strings are intentionally
normalized and not regarded.

Without this modification, the test introduced in 9e8e215e would fail
in post-build MTR on "from Debian-log" and in autopkgtest on "from Debian":

    main.merge_alter                         w4 [ fail ]
            Test ended at 2025-11-26 22:41:38
    CURRENT_TEST: main.merge_alter
    /usr/share/mariadb/mariadb-test/main/merge_alter.result 2025-11-13 11:45:29.000000000 +0300
    /tmp/tmp.3vGjZWHA79/var/4/log/merge_alter.reject 2025-11-27 01:41:38.523996124 +0300
    @@ -10,7 +10,7 @@
     /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
     DELIMITER /*!*/;
     # at #
    -#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
    +#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## from Debian created 010909  4:46:40 at startup
     ROLLBACK/*!*/;
     # at #
     #010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Gtid list []
    Result length mismatch

Forwarded: not-needed

Gbp-Pq: Name include-debian-in-test-merge-alter-result.patch

6 months agoSuppress native AIO warning introduced in 10.8.3
Otto Kekäläinen [Fri, 8 Aug 2025 04:30:51 +0000 (21:30 -0700)]
Suppress native AIO warning introduced in 10.8.3

Upstream a87bb96 introduced a new warning, visible at least on all ppc64el and
s390x builds which makes the post-build mariadb-test-test fail:

    [Warning] InnoDB: native AIO failed: falling back to
    innodb_use_native_aio=OFF

The case of this is the ci environment only where there is insufficent
fs.aio-max-nr configured. A such we are adding a suppression to the
mtr only. The warning is valuable for users. Upstream MDEV-37411 has
added a io_setup as a warning, which will fail in the CI environment,
so we're pre-emptively suppressing this warning too.

Unlike upstream MariaDB, in Debian we removed libaio in for Linux on
MariaDB 10.6+ in 612630c6 and completely in 1d648d6f. This was re-added
by upstream added a system variable innodb_linux_aio to control, and
also provided automated fallback. As such we're readding it back too.

With liburing still seccomp filterer in container environments having
a libaio fallback is more valuable than the threads implementation of
last resort.

Edited & Updated: Daniel Black <daniel@mariabdb.org>

Upstream rejected this with the conclusion, is that it will start working in
Debian/Salsa/Ubuntu/Launchpad once the Linux kernel is new enough to handle the
I/O calls and fallbacks properly, or once the CI system increases the value of
/proc/sys/fs/aio-max-nr to 1 million or so, to allow multiple parallel MariaDB
servers (as started by mariadb-test-run) each have enough quota for native AIO
to work.

Forwarded: https://jira.mariadb.org/browse/MDEV-37411 (rejected)

Gbp-Pq: Name MDEV-37411-suppress-new-warning-about-native-aio.patch

6 months agoImprove output from mariadb-secure-installation to be more honest
Otto Kekäläinen [Wed, 4 Jun 2025 11:46:31 +0000 (14:46 +0300)]
Improve output from mariadb-secure-installation to be more honest

The script is not useful in Debian, and likely misleading to users.
Improve the output to be more clear about what it is doing or is not
doing.

Merged on 'main' in
https://github.com/MariaDB/server/commit/3a08a8e3d2212f3f60937b3fd97207c3ea7b933a
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4457

Gbp-Pq: Name Improve-output-from-mariadb-secure-installation-to-be-mor.patch

6 months agoFix misc spelling in MariaDB Server repository
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Fix misc spelling in MariaDB Server repository

This is a combined patch of various spelling fixes.

* Fix misc typos in MariaDB Server

* Fix spelling of 'allows one to'

  Fix the following Lintian nags introduced in commit
  c8d040938a7ebe10e62506a726702c5990ef4dda:

  I: mariadb-backup: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-backup]
  I: mariadb-server-core: spelling-error-in-binary "allows to" "allows one to" [usr/sbin/mariadbd]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-client-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/test-connect-t]

* Fix typo: Enrypt->Encrypt

Merged in https://github.com/MariaDB/server/commit/5879c85f505d3a11d4b8f479f2437416d8a1d724
and thus included in MariaDB 12.3 onward.

Forwarded: https://github.com/MariaDB/server/pull/4458

Gbp-Pq: Name Fix-misc-spelling-in-MariaDB-Server-repository.patch

6 months agoDisable the 'mysql*' command deprecation warning
Otto Kekalainen [Sun, 30 Jun 2024 15:18:06 +0000 (15:18 +0000)]
Disable the 'mysql*' command deprecation warning

Many command-line tools expect the commands they run to return without
any output in stderr or having error codes. The fact that now in MariaDB
11.4 all 'mysql*' commands emit a deprecation warning causes a lot of
scripts to fail, such as the /etc/init.d/mariadb itself and many dependent
programs as witnessed via Debian autopkgtests. See examples below.

https://ci.debian.net/packages/m/mariadb-connector-odbc/testing/amd64/48373500/
https://ci.debian.net/packages/p/pam-mysql/testing/amd64/48373511/
https://ci.debian.net/packages/r/roundcube/testing/amd64/48373518/

Forwarded: not-needed

Gbp-Pq: Name hide-mysql-command-deprecation-warnings.patch

6 months agoShow banner in server and client startup to drive community engagement
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Show banner in server and client startup to drive community engagement

Suggest to users that they can support MariaDB development by simply giving a
star on GitHub. This patch experiments with how well such a banner works, and
may later change the contents to drive some other kind of engagement.

Client output:

    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 17
    Server version: 11.8.1-MariaDB-5 from Debian -- Please help get to 10k stars at https://github.com/MariaDB/Server

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>

Server output:
    [Note] Please help get to 10k stars at https://github.com/MariaDB/Server

Server output if built in git directory:
    [Note] Starting MariaDB 11.8.1-MariaDB-5 from Debian source revision 1a9c3debfd6b1b16af4e501d3530b866b85c38a8 server_uid eNAjF8/wvUNM09/mSmh+k3a5o5w= as process 1359

Logs will also show as server output:
    mysqld: Version: '11.8.1-MariaDB-5 from Debian'  socket: '/run/mysqld/mysqld.sock'  port: 3306  -- Please help get to 10k stars at https://github.com/MariaDB/Server

This patch can be dropped if Debian updates to ship

Something similar was merged in https://github.com/MariaDB/server/commit/346c7afe9b7071ce9c47892a83d69944b608b3da
and thus included in MariaDB 12.3 onward.

Forwarded: not-needed

Gbp-Pq: Name startup-message.patch

6 months agoInstall PAM modules and systemd units into /usr
Michael Biebl [Mon, 22 Jan 2024 21:52:25 +0000 (22:52 +0100)]
Install PAM modules and systemd units into /usr

Since Debian trixie all files need to be installed into their canonical
location under /usr.

Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061348
Forwarded: https://github.com/MariaDB/server/pull/4065

Gbp-Pq: Name install-files-into-usr.patch

6 months agocmake: add support for reproducible buildS
Sutou Kouhei [Sat, 5 Feb 2022 02:05:39 +0000 (11:05 +0900)]
cmake: add support for reproducible buildS

We should use relative path not absolute path. We can use target without
breaking reproducibility.

This patch can be removed once MariaDB ships with Mroonga v12.00+ that has
https://github.com/mroonga/mroonga/commit/27caeb9b8ce7fa432b1251eca475b517c6902a6c

Origin: https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927
Bug: https://github.com/mroonga/mroonga/issues/298
Forwarded: not-needed

Gbp-Pq: Name mroonga-mrn-lib-dirs-path-reproducible-build.patch

6 months agoFix perl path in scripts
Otto Kekalainen [Sun, 20 Dec 2020 18:58:42 +0000 (20:58 +0200)]
Fix perl path in scripts

Fix Lintian issue https://lintian.debian.org/tags/incorrect-path-for-interpreter.html

Upstream will never accept this patch,
see https://github.com/MariaDB/server/pull/1718

Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/1718.patch
Forwarded: https://github.com/MariaDB/server/pull/1718 (rejected, will never be merged)

Gbp-Pq: Name env-perl-usr-bin-perl.patch

6 months agomariadb (1:11.8.6-2) unstable; urgency=medium
Otto Kekäläinen [Thu, 19 Feb 2026 08:08:08 +0000 (08:08 +0000)]
mariadb (1:11.8.6-2) unstable; urgency=medium

  [ Aquila Macedo ]
  * Add systemd hardening patch for MariaDB units (Closes: #1123021)

  [ Otto Kekäläinen ]
  * Add Lintian override for potentially false new error about embedded
    libminizip
  * Remove patch for x32 compilation now supposedly fixed upstream in ff4209f
  * Update patch statuses and Forwarded fields to match latest
  * Fix path to mariadb-server.README in mariadb-secure-install
    (Closes: #1127863)
  * Add preliminary upstream patch to fix MDEV-38811 that affected Akonadi and
    any other use case that relies on 'skip-grant-tables' (Closes: #1127431)
  * Add functional AppArmor profile for MariaDB 11.8 but keep it in 'complain'
    mode for now to collect real usage experience, and enabling 'enforce' mode
    some day in the future when likelihood of unanticipated AppArmor denials
    is close to zero (Closes: #875890)

[dgit import unpatched mariadb 1:11.8.6-2]

6 months agoImport mariadb_11.8.6-2.debian.tar.xz
Otto Kekäläinen [Thu, 19 Feb 2026 08:08:08 +0000 (08:08 +0000)]
Import mariadb_11.8.6-2.debian.tar.xz

[dgit import tarball mariadb 1:11.8.6-2 mariadb_11.8.6-2.debian.tar.xz]

7 months agoImport mariadb_11.8.6.orig.tar.gz
Otto Kekäläinen [Sat, 7 Feb 2026 08:08:08 +0000 (08:08 +0000)]
Import mariadb_11.8.6.orig.tar.gz

[dgit import orig mariadb_11.8.6.orig.tar.gz]

8 months agoMerge mariadb (1:11.8.5-4) import into refs/heads/workingbranch
Otto Kekäläinen [Tue, 13 Jan 2026 19:03:57 +0000 (19:03 +0000)]
Merge mariadb (1:11.8.5-4) import into refs/heads/workingbranch

8 months agosysusers.d: lock mysql user and keep Debian home/shell
Aquila Macedo [Fri, 9 Jan 2026 00:34:26 +0000 (21:34 -0300)]
sysusers.d: lock mysql user and keep Debian home/shell

Use u! and set HOME=/nonexistent and shell=/bin/false for the mysql
user.

Gbp-Pq: Name sysusers-lock-mysql-account.patch

8 months agoFix MariaDB build failure on amd64v3
Otto Kekäläinen [Mon, 22 Dec 2025 23:05:30 +0000 (15:05 -0800)]
Fix MariaDB build failure on amd64v3

Test patch from https://jira.mariadb.org/browse/MDEV-38398?focusedCommentId=319851&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-319851

Confirmed to work on Launchpad builds. This will most likely be fixed in next
upstream release MariaDB 11.8.6 by upstream in a more elegant way, and this
patch should be kept in Debian (and Ubuntu) only temporairly.

Forwarded: https://jira.mariadb.org/browse/MDEV-38398

Gbp-Pq: Name MDEV-38398-amd64v3-compatibility.patch

8 months agoMake the new merge_alter test indifferent to extra version info
Otto Kekäläinen [Thu, 27 Nov 2025 00:49:24 +0000 (16:49 -0800)]
Make the new merge_alter test indifferent to extra version info

Modify the test regex to accept any extra version info, just like it
accepts any server version info. The test is supposed to fail on actual
differences in behaviour and server info strings are intentionally
normalized and not regarded.

Without this modification, the test introduced in 9e8e215e would fail
in post-build MTR on "from Debian-log" and in autopkgtest on "from Debian":

    main.merge_alter                         w4 [ fail ]
            Test ended at 2025-11-26 22:41:38
    CURRENT_TEST: main.merge_alter
    /usr/share/mariadb/mariadb-test/main/merge_alter.result 2025-11-13 11:45:29.000000000 +0300
    /tmp/tmp.3vGjZWHA79/var/4/log/merge_alter.reject 2025-11-27 01:41:38.523996124 +0300
    @@ -10,7 +10,7 @@
     /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
     DELIMITER /*!*/;
     # at #
    -#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created 010909  4:46:40 at startup
    +#010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## from Debian created 010909  4:46:40 at startup
     ROLLBACK/*!*/;
     # at #
     #010909  4:46:40 server id #  end_log_pos # CRC32 XXX  Gtid list []
    Result length mismatch

Forwarded: not-needed

Gbp-Pq: Name include-debian-in-test-merge-alter-result.patch

8 months agoMDEV-37098 Fix Spider test failures in network-less environments
Otto Kekäläinen [Fri, 12 Dec 2025 08:53:33 +0000 (08:53 +0000)]
MDEV-37098 Fix Spider test failures in network-less environments

When running tests in environments without a network interface (such as
containers with `--network=none`), Spider could not retrieve a hardware
address to generate a node ID. This triggered a warning in the server
log, causing MTR to fail the test due to unexpected output:

    [Warning] mariadbd: Can't get hardware address with error 2

Fix this by logging Spider hardware address errors to server log only.
This ensures the message is recorded in the server log for debugging but
does not pollute the client output.

It is questionable if this is a problem at all anyway, as when
`my_gethwaddr` fails, the code zeroes out the address buffer, resulting
in a `spider_unique_id` formatted like `-000000000000-PID-`, which is
valid.

Forwarded: https://github.com/MariaDB/server/pull/4479

Gbp-Pq: Name MDEV-37098-Spider-test-failures-in-network-less-environments.patch

8 months agoMDEV-38289: innodb.log_corruption_recovery sporadically fails
Marko Mäkelä [Thu, 11 Dec 2025 06:22:41 +0000 (08:22 +0200)]
MDEV-38289: innodb.log_corruption_recovery sporadically fails

When the test is starting up the server with innodb_force_recovery=1,
there will be messages about the LSN being in the future. The current
LSN is expected to be 12338 plus any number of FILE_CHECKPOINT records
(16 bytes each). We have observed anything up to 12402=12338+16*4 in
our CI systems. To be on the safe side, let us allow up to ten records.

Origin: https://github.com/MariaDB/server/commit/4ee491f1b2eb356e9dc40f388f79b62cfeb13609

Gbp-Pq: Name MDEV-38289-innodb.log_corruption_recovery-failed-sporadically.patch

8 months agoMDEV-35810 test log_file_size_online fixup
Marko Mäkelä [Wed, 12 Nov 2025 07:18:55 +0000 (09:18 +0200)]
MDEV-35810 test log_file_size_online fixup

A KILL QUERY of SET GLOBAL innodb_log_file_size would sometimes lead to
ER_QUERY_INTERRUPTED being reported.

This also fixes MDEV-38287 that was visible on Launchpad.net ppc64el and
s390x builders.

Origin: https://github.com/MariaDB/server/commit/8794f8c3d7e1a7dd8e1e2f8c93298ff3f8dbef95

Gbp-Pq: Name MDEV-35810-test-log_file_size_online-fixup.patch

8 months agoMDEV-36668 main.mysqld--help-aria test failure when no MAC address
Sergei Golubchik [Mon, 24 Nov 2025 18:33:35 +0000 (19:33 +0100)]
MDEV-36668 main.mysqld--help-aria test failure when no MAC address

don't use such a greedy regex_replace pattern

Origin: https://github.com/MariaDB/server/commit/5905bb11d080eb5a29dad2c7abe47f7e54254cc9

Gbp-Pq: Name MDEV-36668-main.mysqld--help-aria_test-failure-when-no-MAC-address.patch

8 months ago[PATCH] MDEV-38046 Make func_regexp_pcre tolerant to PCRE2 offset change
Aquila Macedo [Sat, 8 Nov 2025 00:09:05 +0000 (21:09 -0300)]
[PATCH] MDEV-38046 Make func_regexp_pcre tolerant to PCRE2 offset change

PCRE2 10.47 reports the invalid escape in 'A\q' at offset 3 instead of 2.
Update the expected result and add a --replace_regex in the test so the
suite passes with both older and newer PCRE2 versions.

Forwarded: https://jira.mariadb.org/browse/MDEV-38046
(accepted upstream, will be in MariaDB 11.8.6+)

Gbp-Pq: Name MDEV-38046-pcre2-offset.patch

8 months agoSuppress native AIO warning introduced in 10.8.3
Otto Kekäläinen [Fri, 8 Aug 2025 04:30:51 +0000 (21:30 -0700)]
Suppress native AIO warning introduced in 10.8.3

Upstream a87bb96 introduced a new warning, visible at least on all ppc64el and
s390x builds which makes the post-build mariadb-test-test fail:

    [Warning] InnoDB: native AIO failed: falling back to
    innodb_use_native_aio=OFF

The case of this is the ci environment only where there is insufficent
fs.aio-max-nr configured. A such we are adding a suppression to the
mtr only. The warning is valuable for users. Upstream MDEV-37411 has
added a io_setup as a warning, which will fail in the CI environment,
so we're pre-emptively suppressing this warning too.

Unlike upstream MariaDB, in Debian we removed libaio in for Linux on
MariaDB 10.6+ in 612630c6 and completely in 1d648d6f. This was re-added
by upstream added a system variable innodb_linux_aio to control, and
also provided automated fallback. As such we're readding it back too.

With liburing still seccomp filterer in container environments having
a libaio fallback is more valuable than the threads implementation of
last resort.

Edited & Updated: Daniel Black <daniel@mariabdb.org>

Forwarded: https://jira.mariadb.org/browse/MDEV-37411 (rejected)

Upstream rejected this with the conclusion, is that it will start working in
Debian/Salsa/Ubuntu/Launchpad once the Linux kernel is new enough to handle the
I/O calls and fallbacks properly, or once the CI system increases the value of
/proc/sys/fs/aio-max-nr to 1 million or so, to allow multiple parallel MariaDB
servers (as started by mariadb-test-run) each have enough quota for native AIO
to work.

Gbp-Pq: Name MDEV-37411-suppress-new-warning-about-native-aio.patch

8 months agoImprove output from mariadb-secure-installation to be more honest
Otto Kekäläinen [Wed, 4 Jun 2025 11:46:31 +0000 (14:46 +0300)]
Improve output from mariadb-secure-installation to be more honest

The script is not useful in Debian, and likely misleading to users.
Improve the output to be more clear about what it is doing or is not
doing.

Forwarded: https://github.com/MariaDB/server/pull/4457

Gbp-Pq: Name Improve-output-from-mariadb-secure-installation-to-be-mor.patch

8 months agoFix misc spelling in MariaDB Server repository
Otto Kekalainen [Sun, 10 Mar 2024 16:56:13 +0000 (16:56 +0000)]
Fix misc spelling in MariaDB Server repository

This is a combined patch of various spelling fixes.

* Fix misc typos in MariaDB Server

* Fix spelling of 'allows one to'

  Fix the following Lintian nags introduced in commit
  c8d040938a7ebe10e62506a726702c5990ef4dda:

  I: mariadb-backup: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-backup]
  I: mariadb-server-core: spelling-error-in-binary "allows to" "allows one to" [usr/sbin/mariadbd]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-client-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/test-connect-t]

* Fix typo: Enrypt->Encrypt

Forwarded: https://github.com/MariaDB/server/pull/4458

Gbp-Pq: Name Fix-misc-spelling-in-MariaDB-Server-repository.patch